#include mintbind.h>
long Dpathconf(char *name, short which); Return information about various limits/capabilities of the file system on which file name is located. The information returned depends upon which as follows:
ValueMeaning
short Fcntl(short f, void &sstarf#star;arg, short cmd); Do file control commands on file handle f of an open file. cmd and arg vary upon the file type of f and the operation.
long Fgetchar(short f, short mode); Read a character from the file assosiated with handle f. mode determines mode (cooked, raw, echo).
long Finstat( short f); Return the number of characters available for reading from file handle f. (Usefull only for terminals and pipes)
long Foutstat(short f); Return the number of bytes, that may be written to file handle f before the writing process have to go to sleep.
short Fpipe(short &sstarf#star;ptr); Create a pipe. ptr[0] is the read-only end and ptr[1] the write-only end file handle of the pipe.
long Fputchar(short f, long ch, short mode); Write a character to the file whose handle is f. mode is as for Fgetchar.
short Fselect(unsigned short timeout, long &sstarf#star;rfds, long &sstarf#star;wfds, long &sstarf#star;xfds); See, which files are ready for reading, writing or have error conditions on them. timeout is the number of milliseconds to wait before returning. A bit in one of the [rwf]fds bitmaps, which is on, indicates the file descriptor to be tested.
void Pause(); Suspend the process until it receives a signal that is not being ignored and is not masked.
short Pdomain(short newdom); If newdom is not -1, sets the process domain of the current process to newdom. Alway returns previous domain. Domain 0 is the TOS domain and the default; domain 1 is the MiNT domain.
long Pfork(); Create a new process, that is the duplicate of the current one, but has its own copy of the address space. The return value is 0 for the child, and the child's pid in the parent.
short Pgetgid(); short Psetgid(short id); Get or set the group id of the current process.
short Pgetpid(); short Pgetppid(); short Pgetpgrp(); Get the currents process' process id, it's parent's process id, or its process group.
short Pgetuid(); short Psetuid(short id); Return or set the user id under which the current process is running.
short Pkill(short pid, short sig); Send signal sig to process with given pid. If pid= = 0, the signal is sent to all proc's with the same process group.
void Prusage(long rsp[8]); Get various resource information from the operating system.
ValueMeaning
long Psetlimit(short lim, long val); Get/Set a resource limit for a process. The old limit is returned. If val is negativ, the limit is unchanged; 0 sets umlimited resource; any other value sets that limit. lim is defined as follows:
ValueMeaning
short Psetpgrp(short pid, short newgrp); Set the process group of the process with given pid to newgrp.
long Psigblock(unsigned long mask); Adds the signal in the 32 bit mask to the blocked set. The return value is the set of previously blocked signals. (Usage: Psigblock(1 < < SIG#))
long Psignal(short signal, (void)(*handler)(long sig); Installs a signal handler for the indicated signal. handler is the address of a function, that will be called, when the signal occurs.
long Psigpending(); Return a longword containing the signals, that have been sent to the process, but not yet handled.
long Psigreturn(); Prepare to exit from a signal handler. (only needed with longjmp())
long Psigsetmask(unsigned long mask); Replaces the set of blocked signals with mask. The old set of blocked signals is returned.
long Pusrval(long arg); Return the process specific user value for this process.
short Pvfork(); Creates a copy of the current process. Both child and parent share the same address space. The return value is 0 for the child, and the child's pid in the parent.
long Pwait(); Return the exit status of the children run asyncronously.
long Pwait3(short flag, long *rusage); Wait for a child and return its exit status. If rusage is non zero, rusage[0] contains millisec's spend by child in user space and rusage[1] contains millisec's spent by child in kernel space.
short Snice(short delta); Set current processes ``niceness''. A nice process has a lower priority.
short Syield(); Tell MiNT, that is okay to switch processes right now. Always returns 0.
long Sysconf(short n); Return information about various limits/capabilities of the current version of MiNT. Possible values for n are:
ValueMeaning
long Talarm(long sec); Set an alarm to go off sec from now. If sec= =0 cancel any pending alarm.
Dos_tab(); Bios_tab(); Xbios_tab(); These functions return a pointer to the GEMDOS, BIOS and XBIOS funxtion tables.